package com.tjetc.controller;

import com.tjetc.domain.Detail;
import com.tjetc.domain.Detail1;
//import com.tjetc.domain.Introduce;
import com.tjetc.domain.Introduce1;
import com.tjetc.service.IntroduceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("introduce")
public class IntroduceController {
    @Autowired
    private IntroduceService introduceService;
    @GetMapping("lookforIntroduceByid1/{id}")
    public Introduce1 lookforIntroduceByid1(@PathVariable Integer id){
        Introduce1 introduce = introduceService.lookforIntroduceByid1(id);
        return introduce;
    }
    @GetMapping("lookforIntroduceByid2/{id}")
    public  Detail1 lookforIntroduceByid2(@PathVariable Integer id){
        Detail1 list = introduceService.lookforIntroduceByid2(id);
        System.out.println("list = " + list);
        return list;
    }
}
